<template>
	<view class="handbook">
		<view class="line" @click="handleDetail(item)" v-for="(item, index) in data" :key="index">
			<view class="line-top">
				<image class="line-icon" :src="item.icon"></image>
				<view class="line-title">{{ item.title }}</view>
			</view>
			<view class="line-desc">{{ item.desc }}</view>
		</view>
	</view>
</template>

<script setup>
	const props = defineProps({
		data: {
			type: Array,
			default: () => []
		}
	})
	const handleDetail = (val) => {
		uni.navigateTo({
			url: '/pages/home/article_details?id='+val.id
		})
	}
</script>

<style lang="scss" scoped>
	.handbook {
		display: flex;
		flex-wrap: wrap;
		justify-content: space-between;

		.line {
			width: calc(50% - 10rpx);
			background: #FFFFFF;
			box-shadow: 0rpx 8rpx 16rpx 0rpx rgba(128, 128, 128, 0.06);
			border-radius: 20rpx;
			padding: 40rpx 40rpx 30rpx;
			box-sizing: border-box;
			margin-bottom: 20rpx;

			.line-top {
				display: flex;
				align-items: center;
				margin-bottom: 10rpx;

				.line-icon {
					width: 37rpx;
					height: 46rpx;
					margin-right: 22rpx;
				}
				.line-title {
					font-family: PingFang SC, PingFang SC;
					font-weight: 600;
					font-size: 32rpx;
					color: #000000;
					line-height: 38rpx;
				}
			}
			.line-desc {
				font-family: PingFang SC, PingFang SC;
				font-weight: 400;
				font-size: 24rpx;
				color: rgba(0,0,0,0.2);
				line-height: 28rpx;
			}
		}
	}
</style>